package com.heihei.controller.localres;

import com.heihei.common.response.ResponseVO;
import com.heihei.entity.localres.LocalResEntity;
import com.heihei.service.localres.LocalResService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 *  本地资源 Controller
 *
 * @author duanhengfei
 * 2021年12月27日 19:20:46
 */
@Api(tags = "本地资源 Controller")
@RestController
@RequestMapping("/local/res")
public class LocalResController {

    @Resource
    private LocalResService localResService;


    @ApiOperation(value = "列表查询（查询文件子节点）")
    @PostMapping("/pageList")
    public ResponseVO<List<LocalResEntity>> listFiles(@RequestBody LocalResEntity param) {
        return this.localResService.listFiles(param.getUrlAbsPath());
    }

}
